/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.ieslaferreria.creditsintesis.logicgame.statemachineimpl;

/**
 *Heredando de generic state machine esta clase es la controlador de estados de nuestro objecto movil
 * firstexplorer.
 * @author Administrador
 */
public class FirstExplorerStateMachine extends GenericStateMachine implements MobileStateMachine{
    public static final int TR_MAX_TIMES = 7;
    private static final int ST_STP = ST_STOPPED;
    private static final int ST_TR1 = ST_TO_RIGHT;
    private static final int ST_TB1 = ST_TO_BACK;
    private static final int ST_TF1 = ST_TO_FORWARD;
    private static final int ST_TL1 = ST_TO_LEFT;
    private static final int ST_TF2 = 6;
    private static final int ST_TB2 = 7;
    private static final int ST_TR2 = 8;
    private static final int ST_TL2 = 9;
    private static final int ER = ERROR;

        /*  {ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR} */
       /*states , activators*/
   public int[][] statesMoving =
       {/* STOP    GO_F    GO_B    SP_R    SP_L    FR_W    OBS     TIMES*/
/*ST_STP*/{ST_STP, ST_TF1, ST_TB1, ST_TR1, ST_TL1, ST_STP, ST_STP, ST_STP},
/*ST_TF1*/{ST_STP, ST_TF1, ST_TF1, ST_TF1, ST_TF1, ST_TF1, ST_TR1, ST_TF2},
/*ST_TB1*/{ST_STP, ST_TB1, ST_TB1, ST_TB1, ST_TB1, ST_TB1, ST_STP, ST_TB2},
/*ST_TR1*/{ST_STP, ST_TR1, ST_TR1, ST_TR1, ST_TR1, ST_TF1, ST_TL1, ST_TR2},
/*ST_TL1*/{ST_STP, ST_TL1, ST_TL1, ST_TL1, ST_TL1, ST_TF1, ST_TB1, ST_TL2},
/*ST_STP*/{ER,     ER,     ER,     ER,     ER,     ER,     ER,     ER,   },
/*ST_TF2*/{ST_STP, ST_TF2, ST_TF2, ST_TF2, ST_TF2, ST_TF2, ST_TL2, ST_TF1},
/*ST_TB2*/{ST_STP, ST_TB2, ST_TB2, ST_TB2, ST_TB2, ST_TB2, ST_STP, ST_TB1},
/*ST_TR2*/{ST_STP, ST_TR2, ST_TR2, ST_TR2, ST_TR2, ST_TF2, ST_TB2, ST_TR1},
/*ST_TL2*/{ST_STP, ST_TL2, ST_TL2, ST_TL2, ST_TL2, ST_TF2, ST_TR2, ST_TF1},
    };

//       {/* STOP    GO_F    GO_B    SP_R    SP_L    FR_W    OBS     TIMES*/
///*ST_STP*/{ST_STP, ST_TF1, ST_TB1, ST_TR1, ST_TL1, ST_STP, ST_STP, ST_STP},
///*ST_TF1*/{ST_STP, ST_TF1, ST_TF1, ST_TF1, ST_TF1, ST_TF2, ST_TR1, ST_TF2},
///*ST_TB1*/{ST_STP, ST_TB1, ST_TB1, ST_TB1, ST_TB1, ST_TB2, ST_TR2, ST_TL1},
///*ST_TR1*/{ST_STP, ST_TR1, ST_TR1, ST_TR1, ST_TR1, ST_TF1, ST_TB2, ST_TR2},
///*ST_TL1*/{ST_STP, ST_TL1, ST_TL1, ST_TL1, ST_TL1, ST_TB2, ST_TB1, ST_TL2},
///*ST_STP*/{ER,     ER,     ER,     ER,     ER,     ER,     ER,     ER,   },
///*ST_TF2*/{ST_STP, ST_TF2, ST_TF2, ST_TF2, ST_TF2, ST_TF1, ST_TL2, ST_TF1},
///*ST_TB2*/{ST_STP, ST_TB2, ST_TB2, ST_TB2, ST_TB2, ST_TB1, ST_TL1, ST_TR2},
///*ST_TR2*/{ST_STP, ST_TR2, ST_TR2, ST_TR2, ST_TR2, ST_TB1, ST_STP, ST_TR1},
///*ST_TL2*/{ST_STP, ST_TL2, ST_TL2, ST_TL2, ST_TL2, ST_TF2, ST_TR2, ST_TF1},
//    };

    public FirstExplorerStateMachine (){
        this.stateMatrix = statesMoving;
/*at first the state will be always 0, meaning that you are at the map scenery and wihtout moving.*/
        this.state = ST_STOPPED;

    }


}
